-
Notifications
You must be signed in to change notification settings - Fork 2.2k
Add behavioral subfeature data guideline #26781
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: main
Are you sure you want to change the base?
Conversation
Tip: Review these changes grouped by change (recommended for most PRs), or grouped by feature (for large PRs). |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM so far.
Like #26780 already includes, some more examples might help comprehension.
@caugner I already mentioned 3 examples ( |
docs/data-guidelines/index.md
Outdated
- A contextual support condition this is not readily feature detectable, such as a CSS layout context or the effect of [an IDL extended attribute](https://dontcallmedom.github.io/webidlpedia/extended-attributes.html). | ||
|
||
For example, if support for a CSS property is conditioned on the layout context where that property is used, create a subfeature of the property to represent the behavior (as demonstrated by `css.properties.gap.flex_context` and `css.properties.gap.grid_context`). |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Here's what I had in mind:
- A contextual support condition this is not readily feature detectable, such as a CSS layout context or the effect of [an IDL extended attribute](https://dontcallmedom.github.io/webidlpedia/extended-attributes.html). | |
For example, if support for a CSS property is conditioned on the layout context where that property is used, create a subfeature of the property to represent the behavior (as demonstrated by `css.properties.gap.flex_context` and `css.properties.gap.grid_context`). | |
- When support depends on a contextual condition that cannot be easily or accurately feature-detected. | |
Examples: | |
1. CSS layout context: The CSS property `gap` depends on the layout context, so there are behavioral subfeatures `flex_context` and `grid_context` to distinguish support (see: [css/properties/gap.json](https://github.com/mdn/browser-compat-data/blob/main/css/properties/gap.json)). | |
2. Effects of [an IDL extended attribute](https://dontcallmedom.github.io/webidlpedia/extended-attributes.html) <!-- Add example --> |
Same for the behavioral evolution.
Summary
This PR provides a general guideline for creating behavioral subfeatures.
Related issues
This continues a discussion started in #26605 (comment), while #26780 covers the partial implementation part of this.
This was partly inspired by #17352, but is narrower in scope.